﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CopyOptions.cs" company="">
//   
// </copyright>
// <summary>
//   The copy options.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Libium.Core
{
    /// <summary>
    ///   The copy options.
    /// </summary>
    public class CopyOptions
    {
        #region Public Properties

        /// <summary>
        ///   Gets or sets a value indicating whether can copy.
        /// </summary>
        public bool CanCopy { get; set; }

        /// <summary>
        ///   Gets or sets a value indicating whether can link.
        /// </summary>
        public bool CanLink { get; set; }

        /// <summary>
        ///   Gets or sets a value indicating whether can move.
        /// </summary>
        public bool CanMove { get; set; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The is enabled.
        /// </summary>
        /// <param name="action">
        /// The action. 
        /// </param>
        /// <returns>
        /// The <see cref="bool"/> . 
        /// </returns>
        public bool IsEnabled(CopyAction action)
        {
            return action == CopyAction.Copy && this.CanCopy || action == CopyAction.Move && this.CanMove
                   || action == CopyAction.Link && this.CanLink;
        }

        #endregion
    }
}